package com.liaowei.post.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liaowei.model.domain.SpecialColumn;
import com.liaowei.model.vo.SpecialColumnVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author LindaMan
 * @description 针对表【wy_special_column(专栏表)】的数据库操作Mapper
 * @createDate 2023-05-11 08:31:59
 * @Entity com.liaowei.post.model.domain.SpecialColumn
 */
public interface SpecialColumnMapper extends BaseMapper<SpecialColumn> {

    // 根据id修改专栏状态
    int updateStatusById(@Param("status") int status,
                         @Param("updateBY") long updateBy,
                         @Param("id") long id);

    // 分页查询specialColumnVO
    List<SpecialColumn> selectSpecialColumnPage(@Param("pageNum") int pageNum,
                                                    @Param("pageSize") int pageSize);
    int selectCountSpecialColumn();

    // 后台分页查询specialColumnVO
//    List<SpecialColumnVO> selectSpecialColumnVOManagePage(SpecialColumnManagePageParam pageParam);
//    int selectManageCountSpecialColumnVO(SpecialColumnManagePageParam pageParam);
    Integer selectPostAccessNumber(Long specialColumnId);
    Integer selectPostCommentNumber(Long specialColumnId);

    // 根据id查询专栏vo
    SpecialColumnVO selectColumnVOById(Long id);

    // 查询用户最近访问过的帖子所属专栏列表
    List<SpecialColumn> selectAccessColumn(Long userId);

    // 查询热门专栏
    List<SpecialColumnVO> selectHotColumnVOList();

}




